-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct incorrectly typed X-OC-Mtime header #3793
Conversation
@stefan-squareweave, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991, @butonic and @MorrisJobke to be potential reviewers. |
Signed-off-by: Stefan Schneider <stefan.schneider@squareweave.com.au>
860c479
to
f6ef024
Compare
Thnx for the PR! Wouldn't trying to cast to an int make more sense? |
Hello. Did you mean just replacing the intval($mtimeStr) call with (int)$mtimeStr? I think they should be equivalent. If you mean my is_numeric check, I just put that in as it makes it extra clear for external clients what the required type is. Before this PR it would have been ambiguous whether the type of the X-OC-Mtime header was just unix timetamp, or both unix timestamp and parseable date string (either would work). To check which was correct this I searched the internet and found two external clients: the owncloud client, and lftp (!). Both of them passed in unix timestamps, so I think making it just a unix timestamp is correct. |
Sorry I was to quick (mobile). Looks good and works here! |
This commit extends the changes introduced in pull request #3793 also to chunked uploads. The "sanitizeMTime" method name is the same used in the equivalent pull request to this one from ownCloud (28066). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit extends the changes introduced in pull request #3793 also to chunked uploads. The "sanitizeMTime" method name is the same used in the equivalent pull request to this one from ownCloud (28066). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This bug causes file uploads to show an error message when using the Postgres database and a storage backend that uses the filecache system.
The error message you get in the HTTP response is something like:
As can be seen, the value passed in for the mtime column is a string representation of a floating point number. In postgres this column is an integer, and so the update fails.